{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "%cd /home/xiaobo/Project/Trans-WSSS\n",
    "%pwd\n",
    "\n",
    "from matplotlib import pyplot as plt"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "outputs": [],
   "source": [
    "num_shot = [16, 32, 64, 128, 256, 384]\n",
    "labeled_ratio = ['16\\n(3%)', '32\\n(6%)', '64\\n(12.5%)', '128\\n(25%)', '256\\n(51%)', '384\\n(70%)']\n",
    "seed_mIoU = [51.4, 54.1, 56.6, 58.1, 58.9, 59.79]\n",
    "\n",
    "fig: plt.figure = plt.figure(dpi=600)\n",
    "ax = fig.add_subplot(111)\n",
    "\n",
    "ax.plot(num_shot, seed_mIoU, marker='o', label='seed')\n",
    "ax.set_xscale('log')\n",
    "ax.axhline(55.3, color='red', linestyle='--')\n",
    "ax.axhline(59.9, color='green', linestyle='--')\n",
    "\n",
    "ax.set_xticks(num_shot, labeled_ratio)\n",
    "\n",
    "ax.set_title(\"样本\")\n",
    "ax.set_xlabel(\"Number of labeled samples for each class\")\n",
    "ax.set_ylabel(\"mIoU\")\n",
    "\n",
    "fig.savefig('temp/few_shot_mIoU.png', dpi=600, bbox_inches='tight')"
   ],
   "metadata": {
    "collapsed": false
   }
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}
